Skip to content
This repository was archived by the owner on Feb 21, 2022. It is now read-only.

Commit 32c711b

Browse files
authored
Merge pull request #29 from mmoreram/fix/fixed-autoload-reference
Fixed autoload
2 parents 0d7d566 + b3339fe commit 32c711b

14 files changed

+42
-12
lines changed

bin/php-formatter

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* @author Marc Morera <yuhu@mmoreram.com>
1515
*/
1616

17-
require __DIR__ . '/../vendor/autoload.php';
17+
require __DIR__ . '/../src/bootstrap.php';
1818

1919
use Mmoreram\PHPFormatter\Console\Application;
2020

build/php-formatter.phar

509 Bytes
Binary file not shown.

src/bootstrap.php

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the php-formatter package
5+
*
6+
* Copyright (c) >=2014 Marc Morera
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*
11+
* Feel free to edit as you please, and have fun.
12+
*
13+
* @author Marc Morera <yuhu@mmoreram.com>
14+
*/
15+
16+
declare(strict_types=1);
17+
18+
function includeIfExists($file)
19+
{
20+
return file_exists($file) ? include $file : false;
21+
}
22+
23+
if ((!$loader = includeIfExists(__DIR__ . '/../vendor/autoload.php')) && (!$loader = includeIfExists(__DIR__ . '/../../../autoload.php'))) {
24+
echo 'You must set up the project dependencies, run the following commands:' . PHP_EOL .
25+
'curl -sS https://getcomposer.org/installer | php' . PHP_EOL .
26+
'php composer.phar install' . PHP_EOL;
27+
exit(1);
28+
}
29+
30+
return $loader;

tests/PHPFormatter/Finder/ConfigFinderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/*
44
* This file is part of the php-formatter package
55
*
6-
* Copyright (c) 2014-2016 Marc Morera
6+
* Copyright (c) >=2014 Marc Morera
77
*
88
* For the full copyright and license information, please view the LICENSE
99
* file that was distributed with this source code.

tests/PHPFormatter/Finder/FileFinderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/*
44
* This file is part of the php-formatter package
55
*
6-
* Copyright (c) 2014-2016 Marc Morera
6+
* Copyright (c) >=2014 Marc Morera
77
*
88
* For the full copyright and license information, please view the LICENSE
99
* file that was distributed with this source code.

tests/PHPFormatter/Fixer/EmptyHeaderFixerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/*
44
* This file is part of the php-formatter package
55
*
6-
* Copyright (c) 2014-2016 Marc Morera
6+
* Copyright (c) >=2014 Marc Morera
77
*
88
* For the full copyright and license information, please view the LICENSE
99
* file that was distributed with this source code.

tests/PHPFormatter/Fixer/HeaderFixerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/*
44
* This file is part of the php-formatter package
55
*
6-
* Copyright (c) 2014-2016 Marc Morera
6+
* Copyright (c) >=2014 Marc Morera
77
*
88
* For the full copyright and license information, please view the LICENSE
99
* file that was distributed with this source code.

tests/PHPFormatter/Fixer/HeaderWithStrictFixerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/*
44
* This file is part of the php-formatter package
55
*
6-
* Copyright (c) 2014-2016 Marc Morera
6+
* Copyright (c) >=2014 Marc Morera
77
*
88
* For the full copyright and license information, please view the LICENSE
99
* file that was distributed with this source code.

tests/PHPFormatter/Fixer/StrictFixerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/*
44
* This file is part of the php-formatter package
55
*
6-
* Copyright (c) 2014-2016 Marc Morera
6+
* Copyright (c) >=2014 Marc Morera
77
*
88
* For the full copyright and license information, please view the LICENSE
99
* file that was distributed with this source code.

tests/PHPFormatter/Fixer/UseSortFixerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/*
44
* This file is part of the php-formatter package
55
*
6-
* Copyright (c) 2014-2016 Marc Morera
6+
* Copyright (c) >=2014 Marc Morera
77
*
88
* For the full copyright and license information, please view the LICENSE
99
* file that was distributed with this source code.

tests/PHPFormatter/Loader/ConfigLoaderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/*
44
* This file is part of the php-formatter package
55
*
6-
* Copyright (c) 2014-2016 Marc Morera
6+
* Copyright (c) >=2014 Marc Morera
77
*
88
* For the full copyright and license information, please view the LICENSE
99
* file that was distributed with this source code.

tests/PHPFormatter/Mocks/MyClass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/*
44
* This file is part of the php-formatter package
55
*
6-
* Copyright (c) 2014-2016 Marc Morera
6+
* Copyright (c) >=2014 Marc Morera
77
*
88
* For the full copyright and license information, please view the LICENSE
99
* file that was distributed with this source code.

tests/PHPFormatter/Mocks/MyOtherClass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/*
44
* This file is part of the php-formatter package
55
*
6-
* Copyright (c) 2014-2016 Marc Morera
6+
* Copyright (c) >=2014 Marc Morera
77
*
88
* For the full copyright and license information, please view the LICENSE
99
* file that was distributed with this source code.

tests/PHPFormatter/Mocks/directory/MyThirdClass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/*
44
* This file is part of the php-formatter package
55
*
6-
* Copyright (c) 2014-2016 Marc Morera
6+
* Copyright (c) >=2014 Marc Morera
77
*
88
* For the full copyright and license information, please view the LICENSE
99
* file that was distributed with this source code.

0 commit comments

Comments
 (0)