Test Setup Failed
Push — master ( 624979...d168a5 )
by Matthew
10:19
created
tests/api/Domain/Validators/RoundTimeValidatorTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
 
9 9
 class RoundTimeValidatorTest extends TestCase {
10 10
   function setUp() {
11
-    $this->app = require dirname(__FILE__).'/../../../../api/config/_app.php';
11
+    $this->app = require dirname(__FILE__) . '/../../../../api/config/_app.php';
12 12
     $this->roundTimeCreateModel = new RoundTimeCreateModel();
13 13
     $this->sut = new RoundTimeValidator($this->app);
14 14
   }
Please login to merge, or discard this patch.
tests/api/Domain/Validators/PickValidatorTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
 
11 11
 class PickValidatorTest extends TestCase {
12 12
   function setUp() {
13
-    $this->app = require dirname(__FILE__).'/../../../../api/config/_app.php';
13
+    $this->app = require dirname(__FILE__) . '/../../../../api/config/_app.php';
14 14
     $draftDataRepository = new DraftDataRepository($this->app);
15 15
     $this->app['phpdraft.DraftDataRepository'] = $draftDataRepository;
16 16
     $this->sut = new PickValidator($this->app);
Please login to merge, or discard this patch.
tests/api/Domain/Validators/ProPlayerValidatorTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@
 block discarded – undo
7 7
 
8 8
 class ProPlayerValidatorTest extends TestCase {
9 9
   function setUp() {
10
-    $this->app = require dirname(__FILE__).'/../../../../api/config/_app.php';
10
+    $this->app = require dirname(__FILE__) . '/../../../../api/config/_app.php';
11 11
     $draftDataRepository = new DraftDataRepository($this->app);
12 12
     $this->sut = new ProPlayerValidator($this->app);
13 13
     $this->app['phpdraft.DraftDataRepository'] = $draftDataRepository;
Please login to merge, or discard this patch.
tests/api/Domain/Validators/TradeValidatorTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
 
12 12
 class TradeValidatorTest extends TestCase {
13 13
   function setUp() {
14
-    $this->app = require dirname(__FILE__).'/../../../../api/config/_app.php';
14
+    $this->app = require dirname(__FILE__) . '/../../../../api/config/_app.php';
15 15
     $this->draft = new Draft();
16 16
     $this->trade = new Trade();
17 17
     $this->trade->manager1 = new Manager();
Please login to merge, or discard this patch.
deploy/_package_tasks.php 2 patches
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
     $items_required_for_packaging = [
19 19
         'app',
20 20
         'db',
21
-		'deploy',
21
+    'deploy',
22 22
         'gulp'
23 23
     ];
24 24
 
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
         'db',
96 96
         'deploy',
97 97
         'fonts',
98
-		'images',
98
+    'images',
99 99
         'vendor',
100 100
         'js'
101 101
     ];
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
         'composer.json',
106 106
         'composer.lock',
107 107
         'README.MD',
108
-		'package.json',
108
+    'package.json',
109 109
         'index.html',
110 110
         'web.config'
111 111
     ];
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
     $archivePath = get('phpdraft')['releasePath'];
115 115
 
116 116
     foreach($phpdraft_release_dirs as $archiveDirectory) {
117
-		runLocally("7z a $archivePath/$releaseFileName $archiveDirectory");
117
+    runLocally("7z a $archivePath/$releaseFileName $archiveDirectory");
118 118
     }
119 119
 
120 120
     foreach($phpdraft_release_files as $archiveFile) {
@@ -122,16 +122,16 @@  discard block
 block discarded – undo
122 122
     }
123 123
 
124 124
     //Hard-coded so we copy a working deploy.php so no one technically needs to edit a single file
125
-	runLocally("7z a $archivePath/$releaseFileName deploy/deploy.php.release");
126
-	runLocally("7z a $archivePath/$releaseFileName deploy/appsettings.php.ci");
127
-	runLocally("7z a $archivePath/$releaseFileName deploy/phinx.yml.ci");
128
-	runLocally("7z rn $archivePath/$releaseFileName deploy/deploy.php.release deploy.php");
129
-	runLocally("7z rn $archivePath/$releaseFileName deploy/appsettings.php.ci appsettings.php");
130
-	runLocally("7z rn $archivePath/$releaseFileName deploy/phinx.yml.ci phinx.yml");
131
-
132
-	//Re-include them in case anyone using this packaged release needs CI versions of these!
133
-	runLocally("7z a $archivePath/$releaseFileName deploy/appsettings.php.ci");
134
-	runLocally("7z a $archivePath/$releaseFileName deploy/phinx.yml.ci");
125
+  runLocally("7z a $archivePath/$releaseFileName deploy/deploy.php.release");
126
+  runLocally("7z a $archivePath/$releaseFileName deploy/appsettings.php.ci");
127
+  runLocally("7z a $archivePath/$releaseFileName deploy/phinx.yml.ci");
128
+  runLocally("7z rn $archivePath/$releaseFileName deploy/deploy.php.release deploy.php");
129
+  runLocally("7z rn $archivePath/$releaseFileName deploy/appsettings.php.ci appsettings.php");
130
+  runLocally("7z rn $archivePath/$releaseFileName deploy/phinx.yml.ci phinx.yml");
131
+
132
+  //Re-include them in case anyone using this packaged release needs CI versions of these!
133
+  runLocally("7z a $archivePath/$releaseFileName deploy/appsettings.php.ci");
134
+  runLocally("7z a $archivePath/$releaseFileName deploy/phinx.yml.ci");
135 135
 })->setPrivate();
136 136
 
137 137
 desc('Package resources with 7zip');
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -22,8 +22,8 @@  discard block
 block discarded – undo
22 22
         'gulp'
23 23
     ];
24 24
 
25
-    foreach($items_required_for_packaging as $directory) {
26
-        if(file_exists($directory) !== true) {
25
+    foreach ($items_required_for_packaging as $directory) {
26
+        if (file_exists($directory) !== true) {
27 27
             writeln("<error>Directory $directory does not exist, cannot package.</error>\n");
28 28
             writeln("<error>In order to package a release, you must start with sourcecode from the Github repository, not from a prepackaged release from the Github Releases (you've apparently done it backwards :) )</error>\n");
29 29
             throw new \Exception("PHP Draft cannot be packaged for release.");
@@ -32,14 +32,14 @@  discard block
 block discarded – undo
32 32
 
33 33
     $yarn_output = runLocally('yarn -v');
34 34
 
35
-    if(strpos($yarn_output, '.') == false) {
35
+    if (strpos($yarn_output, '.') == false) {
36 36
         writeln('<error>Yarn not found on path. Install Yarn globally for commandline use</error>');
37 37
         throw new \Exception("PHP Draft cannot be packaged for release");
38 38
     }
39 39
 
40 40
     $sevenZip_output = runLocally('7z');
41 41
 
42
-    if(strpos($sevenZip_output, 'Igor Pavlov') == false) {
42
+    if (strpos($sevenZip_output, 'Igor Pavlov') == false) {
43 43
         writeln('<error>7-Zip not found on path. Install 7-Zip for commandline use</error>');
44 44
         throw new \Exception("PHP Draft cannot be packaged for release");
45 45
     }
@@ -48,11 +48,11 @@  discard block
 block discarded – undo
48 48
     $resourceFileName = get('phpdraft')['resourceFile'];
49 49
     $archivePath = get('phpdraft')['releasePath'];
50 50
 
51
-    if(file_exists("$archivePath/$releaseFileName")) {
51
+    if (file_exists("$archivePath/$releaseFileName")) {
52 52
         throw new \Exception("File $archivePath/$releaseFileName already exists.");
53 53
     }
54 54
 
55
-    if(file_exists("$archivePath/$resourceFileName")) {
55
+    if (file_exists("$archivePath/$resourceFileName")) {
56 56
         throw new \Exception("File $archivePath/$resourceFileName already exists.");
57 57
     }
58 58
 })->setPrivate();
@@ -113,11 +113,11 @@  discard block
 block discarded – undo
113 113
     $releaseFileName = get('phpdraft')['releaseFile'];
114 114
     $archivePath = get('phpdraft')['releasePath'];
115 115
 
116
-    foreach($phpdraft_release_dirs as $archiveDirectory) {
116
+    foreach ($phpdraft_release_dirs as $archiveDirectory) {
117 117
 		runLocally("7z a $archivePath/$releaseFileName $archiveDirectory");
118 118
     }
119 119
 
120
-    foreach($phpdraft_release_files as $archiveFile) {
120
+    foreach ($phpdraft_release_files as $archiveFile) {
121 121
         runLocally("7z a $archivePath/$releaseFileName $archiveFile");
122 122
     }
123 123
 
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
     $resourceFileName = get('phpdraft')['resourceFile'];
145 145
     $archivePath = get('phpdraft')['releasePath'];
146 146
 
147
-    foreach($goodResources as $resourceFile) {
147
+    foreach ($goodResources as $resourceFile) {
148 148
         runLocally("7z a $archivePath/$resourceFileName $phpdraft_resource_dir/$resourceFile");
149 149
     }
150 150
 })->setPrivate();
Please login to merge, or discard this patch.
deploy/_setup_tasks.php 2 patches
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -13,12 +13,12 @@  discard block
 block discarded – undo
13 13
 
14 14
 desc('PHP Draft: Offer to backup current settings for future upgrade imports');
15 15
 task('backup', function() {
16
-	if (file_exists("js/config.js") == false) {
17
-		writeln("<error>Looks like js/config.js doesn't exist - I can't back up your settings.</error>\n");
18
-		writeln("<comment>Ensure you have downloaded a compiled release from https://github.com/mattheworres/phpdraft/releases</comment>\n");
19
-		writeln("<comment>Or, if you are building from sourcecode, consult the wiki on how to properly prepare a release.</comment>\n");
20
-		throw new \Exception("PHP Draft is not in a exportable state (use downloads from Releases on Github)");
21
-	}
16
+  if (file_exists("js/config.js") == false) {
17
+    writeln("<error>Looks like js/config.js doesn't exist - I can't back up your settings.</error>\n");
18
+    writeln("<comment>Ensure you have downloaded a compiled release from https://github.com/mattheworres/phpdraft/releases</comment>\n");
19
+    writeln("<comment>Or, if you are building from sourcecode, consult the wiki on how to properly prepare a release.</comment>\n");
20
+    throw new \Exception("PHP Draft is not in a exportable state (use downloads from Releases on Github)");
21
+  }
22 22
 
23 23
   writeln("\n\n<info>Looking great! Hey, if you want I can back up these snazzy settings files "
24 24
     ."I just created for you. This will make it WAY easier to update PHP Draft in the future!</info>\n");
@@ -35,8 +35,8 @@  discard block
 block discarded – undo
35 35
     runLocally("cp js/config.js $backup_location/config.js");
36 36
     runLocally("cp phinx.yml $backup_location/phinx.yml");
37 37
     runLocally("cp deploy.php $backup_location/deploy.php");
38
-		runLocally("cp .htaccess $backup_location/.htaccess");
39
-		runLocally("cp index.html $backup_location/index.html");
38
+    runLocally("cp .htaccess $backup_location/.htaccess");
39
+    runLocally("cp index.html $backup_location/index.html");
40 40
     runLocally("cp web.config $backup_location/web.config");
41 41
   }
42 42
 });
@@ -131,9 +131,9 @@  discard block
 block discarded – undo
131 131
 
132 132
 desc('Copy files from the deploy directory to their place.');
133 133
 task('phpdraft:copyfiles', function() {
134
-	if(file_exists('js') !== true) {
135
-		runLocally('mkdir js');
136
-	}
134
+  if(file_exists('js') !== true) {
135
+    runLocally('mkdir js');
136
+  }
137 137
 
138 138
   runLocally('cp deploy/config.js.ci js/config.js');
139 139
   runLocally('cp deploy/appsettings.php.ci appsettings.php');
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
     ."I just created for you. This will make it WAY easier to update PHP Draft in the future!</info>\n");
25 25
   $answer = askConfirmation("Should I back up your settings for you?", false);
26 26
 
27
-  if($answer == true) {
27
+  if ($answer == true) {
28 28
     writeln("\n\n<info>Awesome! Wherever you tell me to back your settings up to, you should make sure "
29 29
       ."that only your user has permissions to view the file (if the server you're installing on "
30 30
       ."is more important, you should probably ensure your disk is encrypted, too).</info>\n");
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 
49 49
   $answer = askConfirmation($message, false);
50 50
 
51
-  if($answer == false) {
51
+  if ($answer == false) {
52 52
     throw new \Exception("Quitting setup at the user's request. BYE FELICIA.");
53 53
   }
54 54
 })->setPrivate();
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
 
132 132
 desc('Copy files from the deploy directory to their place.');
133 133
 task('phpdraft:copyfiles', function() {
134
-	if(file_exists('js') !== true) {
134
+	if (file_exists('js') !== true) {
135 135
 		runLocally('mkdir js');
136 136
 	}
137 137
 
@@ -150,8 +150,8 @@  discard block
 block discarded – undo
150 150
     'deploy.php'
151 151
   ];
152 152
 
153
-  foreach(get('phpdraft_setup_variables') as $property => $value) {
154
-    foreach($files_to_replace_in as $file) {
153
+  foreach (get('phpdraft_setup_variables') as $property => $value) {
154
+    foreach ($files_to_replace_in as $file) {
155 155
       //TODO: Is there something more platform agnostic we can use?
156 156
       runLocally("sed -i '' 's|{phpdraft.$property}|$value|g' $file $file");
157 157
     }
Please login to merge, or discard this patch.