@@ -28,7 +28,7 @@ |
||
| 28 | 28 | * TODO: Build loop |
| 29 | 29 | */ |
| 30 | 30 | |
| 31 | - $setter = 'set'.ucfirst($key); |
|
| 31 | + $setter = 'set' . ucfirst($key); |
|
| 32 | 32 | if (is_callable([$grams, $setter])) { |
| 33 | 33 | $gram->$setter($key, $value); |
| 34 | 34 | } |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | <?php |
| 62 | 62 | $i = 0; |
| 63 | 63 | $xmlData = simplexml_load_file('ig-data.xml'); |
| 64 | - $grams = array_reverse( json_decode( json_encode($xmlData->instagram) , 1)); |
|
| 64 | + $grams = array_reverse(json_decode(json_encode($xmlData->instagram), 1)); |
|
| 65 | 65 | ?> |
| 66 | 66 | </pre> |
| 67 | 67 | <?php |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | |
| 133 | 133 | <pre> |
| 134 | 134 | <?php |
| 135 | - if ($_SERVER['HTTP_HOST'] == 'localhost' || $_SERVER['HTTP_HOST'] == '127.0.0.1'){ |
|
| 135 | + if ($_SERVER['HTTP_HOST'] == 'localhost' || $_SERVER['HTTP_HOST'] == '127.0.0.1') { |
|
| 136 | 136 | require_once('instagallery-editor.php'); |
| 137 | 137 | } |
| 138 | 138 | ?> |
@@ -1,7 +1,7 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | $xml = simplexml_load_file('ig-data.xml'); |
| 3 | 3 | |
| 4 | -if (isset($_POST['gram'])){ |
|
| 4 | +if (isset($_POST['gram'])) { |
|
| 5 | 5 | $xml->addChild('instagram', $_POST['gram']); |
| 6 | 6 | $xml->saveXML(); |
| 7 | 7 | |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | <nobr> |
| 28 | 28 | <a href="#" target="_self">INSTAGALLERY</a> |
| 29 | 29 | <a href="https://github.com/cowglow/ig-gallery" |
| 30 | - target="_blank"><?php include dirname(__DIR__).DIRECTORY_SEPARATOR.'partials'.DIRECTORY_SEPARATOR.'github-svg.php'; ?></a> |
|
| 30 | + target="_blank"><?php include dirname(__DIR__) . DIRECTORY_SEPARATOR . 'partials' . DIRECTORY_SEPARATOR . 'github-svg.php'; ?></a> |
|
| 31 | 31 | </nobr> |
| 32 | 32 | </h1> |
| 33 | 33 | </div> |
@@ -1,15 +1,15 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | // Require once the Composer Autoload |
| 3 | -if (file_exists(\dirname(__FILE__).'/vendor/autoload.php')) { |
|
| 4 | - require_once \dirname(__FILE__).'/vendor/autoload.php'; |
|
| 3 | +if (file_exists(\dirname(__FILE__) . '/vendor/autoload.php')) { |
|
| 4 | + require_once \dirname(__FILE__) . '/vendor/autoload.php'; |
|
| 5 | 5 | } |
| 6 | 6 | |
| 7 | 7 | $GLOBALS['isDev'] = ($_SERVER['SERVER_NAME'] === 'localhost'); |
| 8 | 8 | $GLOBALS['config'] = require 'config.php'; |
| 9 | 9 | |
| 10 | -$partials = __DIR__.DIRECTORY_SEPARATOR.'assets'.DIRECTORY_SEPARATOR.'partials'; |
|
| 10 | +$partials = __DIR__ . DIRECTORY_SEPARATOR . 'assets' . DIRECTORY_SEPARATOR . 'partials'; |
|
| 11 | 11 | |
| 12 | -include $partials.DIRECTORY_SEPARATOR.'header.php'; |
|
| 12 | +include $partials . DIRECTORY_SEPARATOR . 'header.php'; |
|
| 13 | 13 | |
| 14 | 14 | $App = new Cowglow\InstagramGallery\Ports\App($GLOBALS['config']['bind'], $GLOBALS['config']['type']); |
| 15 | 15 | |
@@ -23,4 +23,4 @@ discard block |
||
| 23 | 23 | print_r($grams); |
| 24 | 24 | echo '</pre>'; |
| 25 | 25 | |
| 26 | -include $partials.DIRECTORY_SEPARATOR.'footer.php'; |
|
| 26 | +include $partials . DIRECTORY_SEPARATOR . 'footer.php'; |
|
@@ -1,10 +1,10 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | error_reporting(E_ALL); |
| 4 | -$autoloader = __DIR__.DIRECTORY_SEPARATOR.'vendor'.DIRECTORY_SEPARATOR.'autoload.php'; |
|
| 5 | -if (!file_exists($autoloader)){ |
|
| 6 | - echo 'Composer autoloader not found:'.$autoloader.PHP_EOL; |
|
| 7 | - echo 'Please issue \'composer install\' and try again.'.PHP_EOL; |
|
| 4 | +$autoloader = __DIR__ . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php'; |
|
| 5 | +if (!file_exists($autoloader)) { |
|
| 6 | + echo 'Composer autoloader not found:' . $autoloader . PHP_EOL; |
|
| 7 | + echo 'Please issue \'composer install\' and try again.' . PHP_EOL; |
|
| 8 | 8 | exit(1); |
| 9 | 9 | } |
| 10 | 10 | require $autoloader; |
| 11 | 11 | \ No newline at end of file |
@@ -9,8 +9,8 @@ |
||
| 9 | 9 | public function testInitialize(): void |
| 10 | 10 | { |
| 11 | 11 | $testStub = $this->getMockBuilder('DispatchController') |
| 12 | - ->disableOriginalConstructor() |
|
| 13 | - ->getMock(); |
|
| 12 | + ->disableOriginalConstructor() |
|
| 13 | + ->getMock(); |
|
| 14 | 14 | |
| 15 | 15 | $isCallable = is_callable('Initialize', true, $testStub); |
| 16 | 16 | $this->assertEquals(true, $isCallable); |
@@ -11,7 +11,7 @@ |
||
| 11 | 11 | { |
| 12 | 12 | $testStub = $this->createMock(App::class); |
| 13 | 13 | $testStub->method('loadGrams') |
| 14 | - ->willReturn([]); |
|
| 14 | + ->willReturn([]); |
|
| 15 | 15 | $this->assertEquals([], $testStub->loadGrams()); |
| 16 | 16 | } |
| 17 | 17 | } |