This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function run() | |
{ | |
try { | |
if ('POST' === $_SERVER['REQUEST_METHOD']) { | |
echo template_action(); | |
} else { | |
echo form_action(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function should_return_array_or_nothing1() { | |
return false; | |
} | |
function should_return_array_or_nothing2() { | |
return null; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MacBook-Pro-Dawid:symfony macdada$ php metrics.phar --report-html=build/halleck-metrics.html src | |
PHPMetrics by Jean-François Lépine <https://twitter.com/Halleck45> | |
1014/2789 [==========>-----------------] 36%file src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services1-1.php is not valid and has been skipped | |
2788 files have been analyzed. Read and understand these 313351 lines of code will take around 01 hour(s), 04 minute(s) and 14 second(s). | |
Average for each module: | |
+--------------------------------------------------------------------------------------------------------------------+------------+---------------+----------------+-------+----------------+------------+--------+---------+------------+------+-------------+--------------+-------+-------+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Dn; | |
class StringCalculatorSpec | |
{ | |
public function specification() | |
{ | |
return [ | |
'it_is_initializable' => function ($it) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace spec; | |
use PhpSpec\ObjectBehavior; | |
class StringCalculatorSpec extends ObjectBehavior | |
{ | |
function it_is_initializable() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Dn; | |
class StringCalculatorSpec | |
{ | |
public function specification($feature) | |
{ | |
$feature('it_is_initializable', function ($it) { | |
$it->shouldHaveType('StringCalculator'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Dn; | |
class StringCalculatorSpec | |
{ | |
public function specification($feature) | |
{ | |
/** | |
* It is initializable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Dn; | |
class StringCalculatorSpec | |
{ | |
public function specification($features) | |
{ | |
/** | |
* It is initializable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Dn; | |
class StringCalculatorSpec | |
{ | |
function specification() | |
{ | |
return [ | |
'It is initializable' => function ($calculator) |
OlderNewer