Skip to content

Instantly share code, notes, and snippets.

View Shaked's full-sized avatar

Shaked Klein Orbach Shaked

View GitHub Profile
@Shaked
Shaked / UserObjectAndJsonUserObject.php
Created August 23, 2015 21:18
User Object and JsonUser Object
<?php
class User {
private $name;
private $email;
private $facebookId;
public function __construct($name, $email, $facebookId) {
$this->name = $name;
$this->email = $email;
$this->facebookId = $facebookId;
Shaked@mac src (master) $ php test.php -v
Running tests...
......................................................................................................................................................................................!........................................................................................................S.....S.....................................................................................!!S.............................................S.....................
Tests:449
Broken:3
--- /Users/Shaked/Projects/phpfmtoriginal/src/tests/183-phpdoc-generator-coverage.out 2015-10-04 22:29:39.000000000 +0300
+++ /Users/Shaked/Projects/phpfmtoriginal/src/tests/183-phpdoc-generator-coverage.out-got 2015-10-04 22:31:35.000000000 +0300
@@ -1,3 +1,15 @@
+ /**
+* @var mixed
@Shaked
Shaked / 1.php
Last active October 7, 2015 11:56
<?php
class X
{
/**
* @var int
*/
private $x = 1;
const A = 2;
@Shaked
Shaked / 1.php
Last active October 7, 2015 12:01
<?php
class X
{
/**
* Create a new command instance.
*
* @return void
*/
public function __construct($x)
<?php
//passes: Reindent
$string = 'a'.
'b'.
'c'.
'd';
$x = 1;
$string = [
<?php
//example 1
$string = 'a' .
'b' .
'c' .
'd';
//example 2
$string = "a" .
@Shaked
Shaked / ReindentEqual.php
Last active October 26, 2015 13:26
idea
<?php
final class ReindentEqual extends FormatterPass {
/**
* @param $source
* @param $foundTokens
*/
public function candidate($source, $foundTokens) {
return true;
}
@Shaked
Shaked / 1-cur-popup-blocker.md
Last active November 13, 2015 23:40
Remove ynet ad against popup blockers

Remove ynet ad against popup blockers

If you are using a popup blocker, and you are annoyed by Ynet's message that tells you to disable it, you should follow this guide.

  • Go to: chrome-extension://gighmmpiobklfepjocnamgkkbiglidom/options/index.html
  • Click on Edit and add: @@http://www.ynet.co.il/common/javascript/ads.js. Should look like: Popup Blocker Settings
  • Click on Save
  • Once done, save it and go to www.ynet.co.il and use hard referesh.
@Shaked
Shaked / globes.co.il.stop.popup.detecttion.md
Created November 12, 2015 17:48
Remove globes ad against popup blockers

Remove globes.co.il ad against popup blockers

If you are using a popup blocker, and you are annoyed globes's message that tells you to disable it, you should follow this guide.

  • Go to: chrome-extension://gighmmpiobklfepjocnamgkkbiglidom/options/index.html
  • Click on Edit and add: @@http://www.globes.co.il/js/ads.js. Should look like: Popup Blocker Settings
  • Click on Save
  • Once done, save it and go to www.globes.co.il and use hard referesh.
@Shaked
Shaked / in.php
Last active December 11, 2015 01:34
.in
<?php
//passes: StripUnUsedSemiColon
function x() {
};
$x = "a";
if ($x) {};