Passed
Push — master ( 596838...43ce15 )
by Adekunle
02:06
created
src/RestApiTrait.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
      */
174 174
     public static function doSearch(Request $request, Builder $builder, $searchables) /*:Builder*/
175 175
     {
176
-        $builder->where(function (Builder $builder) use ($request, $searchables) {
176
+        $builder->where(function(Builder $builder) use ($request, $searchables) {
177 177
             if ($search = $request->input('search')) {
178 178
                 $keywords = explode(' ', trim($search));
179 179
                 if ($searchables) {
@@ -363,9 +363,9 @@  discard block
 block discarded – undo
363 363
                 $interfaces = class_implements(self::class);
364 364
                 $base = (isset($interfaces[ISchoolFileUpload::class])) ? self::fileBasePath($request) : '';
365 365
                 if ($base) {
366
-                    $base = trim($base, '/,\\') . '/';
366
+                    $base = trim($base, '/,\\').'/';
367 367
                 }
368
-                $path = $request->$key->store('public/' . $base . $key);
368
+                $path = $request->$key->store('public/'.$base.$key);
369 369
                 $path = str_replace('public/', 'storage/', $path);
370 370
 
371 371
                 $path_url = asset($path);
@@ -459,7 +459,7 @@  discard block
 block discarded – undo
459 459
         $fields = self::getUniqueFields();
460 460
         foreach ($fields as $field) {
461 461
             if (isset($rules[$field])) {
462
-                $rules[$field] .= ',' . $id;
462
+                $rules[$field] .= ','.$id;
463 463
             }
464 464
         }
465 465
         return $rules;
Please login to merge, or discard this patch.
src/SchoolFileUploadTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,11 +13,11 @@
 block discarded – undo
13 13
 trait SchoolFileUploadTrait
14 14
 {
15 15
 
16
-    public static function fileBasePath(Request $request){
16
+    public static function fileBasePath(Request $request) {
17 17
         $conf = session('client.configuration');
18 18
         //dd($conf->subdomain);
19 19
 
20
-        if($conf and !empty($conf->subdomain)){
20
+        if ($conf and !empty($conf->subdomain)) {
21 21
             return "school/{$conf->subdomain}";
22 22
         }
23 23
 
Please login to merge, or discard this patch.
src/tests/RestApiTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
      */
16 16
     public function testStore()
17 17
     {
18
-        $response = $this-action('POST', 'Crystoline\LaraRestApiTestController@yourAction', ['links' => 'link1 \n link2']);
18
+        $response = $this - action('POST', 'Crystoline\LaraRestApiTestController@yourAction', ['links' => 'link1 \n link2']);
19 19
         // you can check if response was ok
20 20
         $this->assertTrue($response->isOk(), "Custom message if something went wrong");
21 21
         // or if view received variable
Please login to merge, or discard this patch.