| @@ -32,7 +32,7 @@ | ||
| 32 | 32 | private function registerMessages() | 
| 33 | 33 |      { | 
| 34 | 34 | |
| 35 | -        $this->app->bind( 'Anetwork\Respond\Messages', function() { | |
| 35 | +        $this->app->bind('Anetwork\Respond\Messages', function() { | |
| 36 | 36 | |
| 37 | 37 | return new Messages(); | 
| 38 | 38 | |
| @@ -7,11 +7,11 @@ | ||
| 7 | 7 |  class Respond extends Facade { | 
| 8 | 8 | |
| 9 | 9 | |
| 10 | - /** | |
| 11 | - * Get the registered name of the component. | |
| 12 | - * | |
| 13 | - * @return string | |
| 14 | - */ | |
| 15 | -	protected static function getFacadeAccessor() { return 'Anetwork\Respond\Messages'; } | |
| 10 | + /** | |
| 11 | + * Get the registered name of the component. | |
| 12 | + * | |
| 13 | + * @return string | |
| 14 | + */ | |
| 15 | + protected static function getFacadeAccessor() { return 'Anetwork\Respond\Messages'; } | |
| 16 | 16 | |
| 17 | 17 | } | 
| 18 | 18 | \ No newline at end of file | 
| @@ -47,7 +47,7 @@ discard block | ||
| 47 | 47 | /** | 
| 48 | 48 | * Setter for $statusCode | 
| 49 | 49 | * @param integer $statusCode | 
| 50 | - * @return App\Htpp\Responds\Respond | |
| 50 | + * @return Main | |
| 51 | 51 | * @author Shima Payro <[email protected]> | 
| 52 | 52 | * @since May 2, 2016 9:47:04 AM | 
| 53 | 53 | * @uses | 
| @@ -77,7 +77,7 @@ discard block | ||
| 77 | 77 | /** | 
| 78 | 78 | * Setter for $statusText | 
| 79 | 79 | * @param String $statusText | 
| 80 | - * @return App\HtppApp\Htpp\Responds\Respond | |
| 80 | + * @return Main | |
| 81 | 81 | * @author Shima Payro <[email protected]> | 
| 82 | 82 | * @since May 2, 2016 9:48:23 AM | 
| 83 | 83 | * @uses | 
| @@ -108,7 +108,6 @@ discard block | ||
| 108 | 108 | |
| 109 | 109 | /** | 
| 110 | 110 | * Response which conteins just a message | 
| 111 | - * @param string $message | |
| 112 | 111 | * @author Shima Payro <[email protected]> | 
| 113 | 112 | * @since May 2, 2016 9:49:21 AM | 
| 114 | 113 | * @return json | 
| @@ -131,7 +130,7 @@ discard block | ||
| 131 | 130 | * @author Mehdi Hosseini <[email protected]> | 
| 132 | 131 | * @since August 24, 2016 | 
| 133 | 132 | * @param $errorCode integer | 
| 134 | - * @return instance | |
| 133 | + * @return Main | |
| 135 | 134 | */ | 
| 136 | 135 |      public function setErrorCode( $errorCode ) { | 
| 137 | 136 | |
| @@ -53,7 +53,7 @@ discard block | ||
| 53 | 53 | * @uses | 
| 54 | 54 | * @see | 
| 55 | 55 | */ | 
| 56 | -    public function setStatusCode( $statusCode ) { | |
| 56 | +    public function setStatusCode($statusCode) { | |
| 57 | 57 | |
| 58 | 58 | $this->statusCode = $statusCode; | 
| 59 | 59 | |
| @@ -83,7 +83,7 @@ discard block | ||
| 83 | 83 | * @uses | 
| 84 | 84 | * @see | 
| 85 | 85 | */ | 
| 86 | -    public function setStatusText( $statusText ) { | |
| 86 | +    public function setStatusText($statusText) { | |
| 87 | 87 | |
| 88 | 88 | $this->statusText = $statusText; | 
| 89 | 89 | |
| @@ -100,9 +100,9 @@ discard block | ||
| 100 | 100 | * @uses | 
| 101 | 101 | * @see | 
| 102 | 102 | */ | 
| 103 | -    public function respond( $data ) { | |
| 103 | +    public function respond($data) { | |
| 104 | 104 | |
| 105 | - return response()->json( $data, $this->getStatusCode() ); | |
| 105 | + return response()->json($data, $this->getStatusCode()); | |
| 106 | 106 | |
| 107 | 107 | } | 
| 108 | 108 | |
| @@ -117,12 +117,12 @@ discard block | ||
| 117 | 117 | */ | 
| 118 | 118 |      public function respondWithMessage() { | 
| 119 | 119 | |
| 120 | - return $this->respond( [ | |
| 120 | + return $this->respond([ | |
| 121 | 121 | 'status' => 'fail', | 
| 122 | 122 | 'code' => $this->getErrorCode(), | 
| 123 | 123 | 'message' => $this->getErrorMessage(), | 
| 124 | 124 | |
| 125 | - ] ); | |
| 125 | + ]); | |
| 126 | 126 | |
| 127 | 127 | } | 
| 128 | 128 | |
| @@ -133,9 +133,9 @@ discard block | ||
| 133 | 133 | * @param $errorCode integer | 
| 134 | 134 | * @return instance | 
| 135 | 135 | */ | 
| 136 | -    public function setErrorCode( $errorCode ) { | |
| 136 | +    public function setErrorCode($errorCode) { | |
| 137 | 137 | |
| 138 | - $this->error = config( 'errors.' . $errorCode ); | |
| 138 | +      $this->error = config('errors.'.$errorCode); | |
| 139 | 139 | |
| 140 | 140 | $this->errorCode = $errorCode; | 
| 141 | 141 | |
| @@ -163,7 +163,7 @@ discard block | ||
| 163 | 163 | */ | 
| 164 | 164 |      public function getErrorMessage() { | 
| 165 | 165 | |
| 166 | - return $this->error['message']; | |
| 166 | + return $this->error[ 'message' ]; | |
| 167 | 167 | |
| 168 | 168 | } | 
| 169 | 169 | |
| @@ -177,13 +177,13 @@ discard block | ||
| 177 | 177 | * @uses | 
| 178 | 178 | * @see | 
| 179 | 179 | */ | 
| 180 | -    public function respondWithResult( $data ) { | |
| 180 | +    public function respondWithResult($data) { | |
| 181 | 181 | |
| 182 | - return $this->respond( [ | |
| 182 | + return $this->respond([ | |
| 183 | 183 | 'status' => $this->getStatusText(), | 
| 184 | 184 | 'result' => $data | 
| 185 | 185 | |
| 186 | - ] ); | |
| 186 | + ]); | |
| 187 | 187 | |
| 188 | 188 | } | 
| 189 | 189 | |
| @@ -72,7 +72,6 @@ discard block | ||
| 72 | 72 | /** | 
| 73 | 73 | * Delete action is faild | 
| 74 | 74 | * @author Shima Payro <[email protected]> | 
| 75 | - * @param String $message | |
| 76 | 75 | * @since May 2, 2016 9:53:53 AM | 
| 77 | 76 | * @uses | 
| 78 | 77 | * @see | 
| @@ -88,7 +87,6 @@ discard block | ||
| 88 | 87 | /** | 
| 89 | 88 | * Update action is succeed | 
| 90 | 89 | * @author Shima Payro <[email protected]> | 
| 91 | - * @param String $message | |
| 92 | 90 | * @since May 2, 2016 9:54:09 AM | 
| 93 | 91 | * @uses | 
| 94 | 92 | * @see | 
| @@ -104,7 +102,6 @@ discard block | ||
| 104 | 102 | /** | 
| 105 | 103 | * Insert action is faild | 
| 106 | 104 | * @author Shima Payro <[email protected]> | 
| 107 | - * @param String $message | |
| 108 | 105 | * @since May 2, 2016 9:54:27 AM | 
| 109 | 106 | * @uses | 
| 110 | 107 | * @see | 
| @@ -120,7 +117,6 @@ discard block | ||
| 120 | 117 | /** | 
| 121 | 118 | * Database connection is refused | 
| 122 | 119 | * @author Shima Payro <[email protected]> | 
| 123 | - * @param String $message | |
| 124 | 120 | * @since May 2, 2016 9:54:45 AM | 
| 125 | 121 | * @uses | 
| 126 | 122 | * @see | 
| @@ -136,7 +132,6 @@ discard block | ||
| 136 | 132 | /** | 
| 137 | 133 | * page requested is not found | 
| 138 | 134 | * @author Shima Payro <[email protected]> | 
| 139 | - * @param String $message | |
| 140 | 135 | * @since May 2, 2016 9:55:20 AM | 
| 141 | 136 | * @uses | 
| 142 | 137 | * @see | 
| @@ -152,7 +147,6 @@ discard block | ||
| 152 | 147 | /** | 
| 153 | 148 | * Wrong parameters are entered | 
| 154 | 149 | * @author Shima Payro <[email protected]> | 
| 155 | - * @param String $message | |
| 156 | 150 | * @since May 2, 2016 9:55:20 AM | 
| 157 | 151 | * @uses | 
| 158 | 152 | * @see | 
| @@ -168,7 +162,6 @@ discard block | ||
| 168 | 162 | /** | 
| 169 | 163 | * Method is not allowed | 
| 170 | 164 | * @author Shima Payro <[email protected]> | 
| 171 | - * @param String $message | |
| 172 | 165 | * @since May 2, 2016 9:55:20 AM | 
| 173 | 166 | * @uses | 
| 174 | 167 | * @see | 
| @@ -200,7 +193,6 @@ discard block | ||
| 200 | 193 | /** | 
| 201 | 194 | * The request field is not found | 
| 202 | 195 | * @author Shima Payro <[email protected]> | 
| 203 | - * @param String $message | |
| 204 | 196 | * @since May 2, 2016 9:55:20 AM | 
| 205 | 197 | * @uses | 
| 206 | 198 | * @see | 
| @@ -13,11 +13,11 @@ discard block | ||
| 13 | 13 | * @uses | 
| 14 | 14 | * @see | 
| 15 | 15 | */ | 
| 16 | -    public function succeed( $data ) { | |
| 16 | +    public function succeed($data) { | |
| 17 | 17 | |
| 18 | - return $this->setStatusCode( 200 ) | |
| 19 | - ->setStatusText( 'success' ) | |
| 20 | - ->respondWithResult( $data ); | |
| 18 | + return $this->setStatusCode(200) | |
| 19 | +                    ->setStatusText('success') | |
| 20 | + ->respondWithResult($data); | |
| 21 | 21 | |
| 22 | 22 | } | 
| 23 | 23 | |
| @@ -29,11 +29,11 @@ discard block | ||
| 29 | 29 | * @uses | 
| 30 | 30 | * @see | 
| 31 | 31 | */ | 
| 32 | -    public function deleteSucceeded( $message = 'The requested parameter is deleted successfully!' ) { | |
| 32 | +    public function deleteSucceeded($message = 'The requested parameter is deleted successfully!') { | |
| 33 | 33 | |
| 34 | - return $this->setStatusCode( 200 ) | |
| 35 | - ->setStatusText( 'success' ) | |
| 36 | - ->respondWithMessage( $message ); | |
| 34 | + return $this->setStatusCode(200) | |
| 35 | +                    ->setStatusText('success') | |
| 36 | + ->respondWithMessage($message); | |
| 37 | 37 | |
| 38 | 38 | } | 
| 39 | 39 | |
| @@ -45,11 +45,11 @@ discard block | ||
| 45 | 45 | * @uses | 
| 46 | 46 | * @see | 
| 47 | 47 | */ | 
| 48 | -    public function updateSucceeded( $message = 'The requested parameter is updated successfully!' ) { | |
| 48 | +    public function updateSucceeded($message = 'The requested parameter is updated successfully!') { | |
| 49 | 49 | |
| 50 | - return $this->setStatusCode( 200 ) | |
| 51 | - ->setStatusText( 'success' ) | |
| 52 | - ->respondWithMessage( $message ); | |
| 50 | + return $this->setStatusCode(200) | |
| 51 | +                    ->setStatusText('success') | |
| 52 | + ->respondWithMessage($message); | |
| 53 | 53 | |
| 54 | 54 | } | 
| 55 | 55 | |
| @@ -61,11 +61,11 @@ discard block | ||
| 61 | 61 | * @uses | 
| 62 | 62 | * @see | 
| 63 | 63 | */ | 
| 64 | -    public function insertSucceeded( $message = 'The requested parameter is Added successfully!' ) { | |
| 64 | +    public function insertSucceeded($message = 'The requested parameter is Added successfully!') { | |
| 65 | 65 | |
| 66 | - return $this->setStatusCode( 200 ) | |
| 67 | - ->setStatusText( 'success' ) | |
| 68 | - ->respondWithMessage( $message ); | |
| 66 | + return $this->setStatusCode(200) | |
| 67 | +                    ->setStatusText('success') | |
| 68 | + ->respondWithMessage($message); | |
| 69 | 69 | |
| 70 | 70 | } | 
| 71 | 71 | |
| @@ -79,8 +79,8 @@ discard block | ||
| 79 | 79 | */ | 
| 80 | 80 |      public function deleteFaild() { | 
| 81 | 81 | |
| 82 | - return $this->setStatusCode( 447 ) | |
| 83 | - ->setErrorCode( 5447 ) | |
| 82 | + return $this->setStatusCode(447) | |
| 83 | + ->setErrorCode(5447) | |
| 84 | 84 | ->respondWithMessage(); | 
| 85 | 85 | |
| 86 | 86 | } | 
| @@ -95,8 +95,8 @@ discard block | ||
| 95 | 95 | */ | 
| 96 | 96 |      public function updateFaild() { | 
| 97 | 97 | |
| 98 | - return $this->setStatusCode( 449 ) | |
| 99 | - ->setErrorCode( 5449 ) | |
| 98 | + return $this->setStatusCode(449) | |
| 99 | + ->setErrorCode(5449) | |
| 100 | 100 | ->respondWithMessage(); | 
| 101 | 101 | |
| 102 | 102 | } | 
| @@ -111,8 +111,8 @@ discard block | ||
| 111 | 111 | */ | 
| 112 | 112 |      public function insertFaild() { | 
| 113 | 113 | |
| 114 | - return $this->setStatusCode( 448 ) | |
| 115 | - ->setErrorCode( 5448 ) | |
| 114 | + return $this->setStatusCode(448) | |
| 115 | + ->setErrorCode(5448) | |
| 116 | 116 | ->respondWithMessage(); | 
| 117 | 117 | |
| 118 | 118 | } | 
| @@ -127,8 +127,8 @@ discard block | ||
| 127 | 127 | */ | 
| 128 | 128 |      public function connectionRefused() { | 
| 129 | 129 | |
| 130 | - return $this->setStatusCode( 445 ) | |
| 131 | - ->setErrorCode( 5445 ) | |
| 130 | + return $this->setStatusCode(445) | |
| 131 | + ->setErrorCode(5445) | |
| 132 | 132 | ->respondWithMessage(); | 
| 133 | 133 | |
| 134 | 134 | } | 
| @@ -143,8 +143,8 @@ discard block | ||
| 143 | 143 | */ | 
| 144 | 144 |      public function notFound() { | 
| 145 | 145 | |
| 146 | - return $this->setStatusCode( 404 ) | |
| 147 | - ->setErrorCode( 5404 ) | |
| 146 | + return $this->setStatusCode(404) | |
| 147 | + ->setErrorCode(5404) | |
| 148 | 148 | ->respondWithMessage(); | 
| 149 | 149 | |
| 150 | 150 | } | 
| @@ -159,8 +159,8 @@ discard block | ||
| 159 | 159 | */ | 
| 160 | 160 |      public function wrongParameters() { | 
| 161 | 161 | |
| 162 | - return $this->setStatusCode( 406 ) | |
| 163 | - ->setErrorCode( 5406 ) | |
| 162 | + return $this->setStatusCode(406) | |
| 163 | + ->setErrorCode(5406) | |
| 164 | 164 | ->respondWithMessage(); | 
| 165 | 165 | |
| 166 | 166 | } | 
| @@ -175,8 +175,8 @@ discard block | ||
| 175 | 175 | */ | 
| 176 | 176 |      public function methodNotAllowed() { | 
| 177 | 177 | |
| 178 | - return $this->setStatusCode( 405 ) | |
| 179 | - ->setErrorCode( 5405 ) | |
| 178 | + return $this->setStatusCode(405) | |
| 179 | + ->setErrorCode(5405) | |
| 180 | 180 | ->respondWithMessage(); | 
| 181 | 181 | |
| 182 | 182 | } | 
| @@ -189,11 +189,11 @@ discard block | ||
| 189 | 189 | * @uses | 
| 190 | 190 | * @see | 
| 191 | 191 | */ | 
| 192 | -    public function validationErrors( $data ) { | |
| 192 | +    public function validationErrors($data) { | |
| 193 | 193 | |
| 194 | - return $this->setStatusCode( 420 ) | |
| 195 | - ->setErrorCode( 5420 ) | |
| 196 | - ->respondWithResult( $data ); | |
| 194 | + return $this->setStatusCode(420) | |
| 195 | + ->setErrorCode(5420) | |
| 196 | + ->respondWithResult($data); | |
| 197 | 197 | |
| 198 | 198 | } | 
| 199 | 199 | |
| @@ -207,8 +207,8 @@ discard block | ||
| 207 | 207 | */ | 
| 208 | 208 |      public function requestFieldNotFound() { | 
| 209 | 209 | |
| 210 | - return $this->setStatusCode( 446 ) | |
| 211 | - ->setErrorCode( 1001 ) | |
| 210 | + return $this->setStatusCode(446) | |
| 211 | + ->setErrorCode(1001) | |
| 212 | 212 | ->respondWithMessage(); | 
| 213 | 213 | |
| 214 | 214 | } | 
| @@ -234,10 +234,10 @@ discard block | ||
| 234 | 234 | * @param $code integer | 
| 235 | 235 | * @return json | 
| 236 | 236 | */ | 
| 237 | -    public function error( $code ) { | |
| 237 | +    public function error($code) { | |
| 238 | 238 | |
| 239 | - return $this->SetStatusCode( 400 ) | |
| 240 | - ->setErrorCode( $code ) | |
| 239 | + return $this->SetStatusCode(400) | |
| 240 | + ->setErrorCode($code) | |
| 241 | 241 | ->respondWithMessage(); | 
| 242 | 242 | |
| 243 | 243 | } | 
| @@ -341,6 +341,10 @@ | ||
| 341 | 341 | return $file; | 
| 342 | 342 | } | 
| 343 | 343 | |
| 344 | + /** | |
| 345 | + * @param string $class | |
| 346 | + * @param string $ext | |
| 347 | + */ | |
| 344 | 348 | private function findFileWithExtension($class, $ext) | 
| 345 | 349 |      { | 
| 346 | 350 | // PSR-4 lookup | 
| @@ -123,20 +123,20 @@ discard block | ||
| 123 | 123 | return; | 
| 124 | 124 | } | 
| 125 | 125 | |
| 126 | - $first = $prefix[0]; | |
| 127 | -        if (!isset($this->prefixesPsr0[$first][$prefix])) { | |
| 128 | - $this->prefixesPsr0[$first][$prefix] = (array) $paths; | |
| 126 | + $first = $prefix[ 0 ]; | |
| 127 | +        if (!isset($this->prefixesPsr0[ $first ][ $prefix ])) { | |
| 128 | + $this->prefixesPsr0[ $first ][ $prefix ] = (array) $paths; | |
| 129 | 129 | |
| 130 | 130 | return; | 
| 131 | 131 | } | 
| 132 | 132 |          if ($prepend) { | 
| 133 | - $this->prefixesPsr0[$first][$prefix] = array_merge( | |
| 133 | + $this->prefixesPsr0[ $first ][ $prefix ] = array_merge( | |
| 134 | 134 | (array) $paths, | 
| 135 | - $this->prefixesPsr0[$first][$prefix] | |
| 135 | + $this->prefixesPsr0[ $first ][ $prefix ] | |
| 136 | 136 | ); | 
| 137 | 137 |          } else { | 
| 138 | - $this->prefixesPsr0[$first][$prefix] = array_merge( | |
| 139 | - $this->prefixesPsr0[$first][$prefix], | |
| 138 | + $this->prefixesPsr0[ $first ][ $prefix ] = array_merge( | |
| 139 | + $this->prefixesPsr0[ $first ][ $prefix ], | |
| 140 | 140 | (array) $paths | 
| 141 | 141 | ); | 
| 142 | 142 | } | 
| @@ -167,24 +167,24 @@ discard block | ||
| 167 | 167 | (array) $paths | 
| 168 | 168 | ); | 
| 169 | 169 | } | 
| 170 | -        } elseif (!isset($this->prefixDirsPsr4[$prefix])) { | |
| 170 | +        } elseif (!isset($this->prefixDirsPsr4[ $prefix ])) { | |
| 171 | 171 | // Register directories for a new namespace. | 
| 172 | 172 | $length = strlen($prefix); | 
| 173 | -            if ('\\' !== $prefix[$length - 1]) { | |
| 173 | +            if ('\\' !== $prefix[ $length - 1 ]) { | |
| 174 | 174 |                  throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); | 
| 175 | 175 | } | 
| 176 | - $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; | |
| 177 | - $this->prefixDirsPsr4[$prefix] = (array) $paths; | |
| 176 | + $this->prefixLengthsPsr4[ $prefix[ 0 ] ][ $prefix ] = $length; | |
| 177 | + $this->prefixDirsPsr4[ $prefix ] = (array) $paths; | |
| 178 | 178 |          } elseif ($prepend) { | 
| 179 | 179 | // Prepend directories for an already registered namespace. | 
| 180 | - $this->prefixDirsPsr4[$prefix] = array_merge( | |
| 180 | + $this->prefixDirsPsr4[ $prefix ] = array_merge( | |
| 181 | 181 | (array) $paths, | 
| 182 | - $this->prefixDirsPsr4[$prefix] | |
| 182 | + $this->prefixDirsPsr4[ $prefix ] | |
| 183 | 183 | ); | 
| 184 | 184 |          } else { | 
| 185 | 185 | // Append directories for an already registered namespace. | 
| 186 | - $this->prefixDirsPsr4[$prefix] = array_merge( | |
| 187 | - $this->prefixDirsPsr4[$prefix], | |
| 186 | + $this->prefixDirsPsr4[ $prefix ] = array_merge( | |
| 187 | + $this->prefixDirsPsr4[ $prefix ], | |
| 188 | 188 | (array) $paths | 
| 189 | 189 | ); | 
| 190 | 190 | } | 
| @@ -202,7 +202,7 @@ discard block | ||
| 202 | 202 |          if (!$prefix) { | 
| 203 | 203 | $this->fallbackDirsPsr0 = (array) $paths; | 
| 204 | 204 |          } else { | 
| 205 | - $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths; | |
| 205 | + $this->prefixesPsr0[ $prefix[ 0 ] ][ $prefix ] = (array) $paths; | |
| 206 | 206 | } | 
| 207 | 207 | } | 
| 208 | 208 | |
| @@ -221,11 +221,11 @@ discard block | ||
| 221 | 221 | $this->fallbackDirsPsr4 = (array) $paths; | 
| 222 | 222 |          } else { | 
| 223 | 223 | $length = strlen($prefix); | 
| 224 | -            if ('\\' !== $prefix[$length - 1]) { | |
| 224 | +            if ('\\' !== $prefix[ $length - 1 ]) { | |
| 225 | 225 |                  throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); | 
| 226 | 226 | } | 
| 227 | - $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; | |
| 228 | - $this->prefixDirsPsr4[$prefix] = (array) $paths; | |
| 227 | + $this->prefixLengthsPsr4[ $prefix[ 0 ] ][ $prefix ] = $length; | |
| 228 | + $this->prefixDirsPsr4[ $prefix ] = (array) $paths; | |
| 229 | 229 | } | 
| 230 | 230 | } | 
| 231 | 231 | |
| @@ -314,15 +314,15 @@ discard block | ||
| 314 | 314 | public function findFile($class) | 
| 315 | 315 |      { | 
| 316 | 316 | // work around for PHP 5.3.0 - 5.3.2 https://bugs.php.net/50731 | 
| 317 | -        if ('\\' == $class[0]) { | |
| 317 | +        if ('\\' == $class[ 0 ]) { | |
| 318 | 318 | $class = substr($class, 1); | 
| 319 | 319 | } | 
| 320 | 320 | |
| 321 | 321 | // class map lookup | 
| 322 | -        if (isset($this->classMap[$class])) { | |
| 323 | - return $this->classMap[$class]; | |
| 322 | +        if (isset($this->classMap[ $class ])) { | |
| 323 | + return $this->classMap[ $class ]; | |
| 324 | 324 | } | 
| 325 | -        if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) { | |
| 325 | +        if ($this->classMapAuthoritative || isset($this->missingClasses[ $class ])) { | |
| 326 | 326 | return false; | 
| 327 | 327 | } | 
| 328 | 328 | |
| @@ -335,7 +335,7 @@ discard block | ||
| 335 | 335 | |
| 336 | 336 |          if (false === $file) { | 
| 337 | 337 | // Remember that this class does not exist. | 
| 338 | - $this->missingClasses[$class] = true; | |
| 338 | + $this->missingClasses[ $class ] = true; | |
| 339 | 339 | } | 
| 340 | 340 | |
| 341 | 341 | return $file; | 
| @@ -344,14 +344,14 @@ discard block | ||
| 344 | 344 | private function findFileWithExtension($class, $ext) | 
| 345 | 345 |      { | 
| 346 | 346 | // PSR-4 lookup | 
| 347 | - $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext; | |
| 347 | + $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR).$ext; | |
| 348 | 348 | |
| 349 | - $first = $class[0]; | |
| 350 | -        if (isset($this->prefixLengthsPsr4[$first])) { | |
| 351 | -            foreach ($this->prefixLengthsPsr4[$first] as $prefix => $length) { | |
| 349 | + $first = $class[ 0 ]; | |
| 350 | +        if (isset($this->prefixLengthsPsr4[ $first ])) { | |
| 351 | +            foreach ($this->prefixLengthsPsr4[ $first ] as $prefix => $length) { | |
| 352 | 352 |                  if (0 === strpos($class, $prefix)) { | 
| 353 | -                    foreach ($this->prefixDirsPsr4[$prefix] as $dir) { | |
| 354 | -                        if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) { | |
| 353 | +                    foreach ($this->prefixDirsPsr4[ $prefix ] as $dir) { | |
| 354 | +                        if (file_exists($file = $dir.DIRECTORY_SEPARATOR.substr($logicalPathPsr4, $length))) { | |
| 355 | 355 | return $file; | 
| 356 | 356 | } | 
| 357 | 357 | } | 
| @@ -361,7 +361,7 @@ discard block | ||
| 361 | 361 | |
| 362 | 362 | // PSR-4 fallback dirs | 
| 363 | 363 |          foreach ($this->fallbackDirsPsr4 as $dir) { | 
| 364 | -            if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) { | |
| 364 | +            if (file_exists($file = $dir.DIRECTORY_SEPARATOR.$logicalPathPsr4)) { | |
| 365 | 365 | return $file; | 
| 366 | 366 | } | 
| 367 | 367 | } | 
| @@ -373,14 +373,14 @@ discard block | ||
| 373 | 373 | . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR); | 
| 374 | 374 |          } else { | 
| 375 | 375 | // PEAR-like class name | 
| 376 | - $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext; | |
| 376 | + $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR).$ext; | |
| 377 | 377 | } | 
| 378 | 378 | |
| 379 | -        if (isset($this->prefixesPsr0[$first])) { | |
| 380 | -            foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) { | |
| 379 | +        if (isset($this->prefixesPsr0[ $first ])) { | |
| 380 | +            foreach ($this->prefixesPsr0[ $first ] as $prefix => $dirs) { | |
| 381 | 381 |                  if (0 === strpos($class, $prefix)) { | 
| 382 | 382 |                      foreach ($dirs as $dir) { | 
| 383 | -                        if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { | |
| 383 | +                        if (file_exists($file = $dir.DIRECTORY_SEPARATOR.$logicalPathPsr0)) { | |
| 384 | 384 | return $file; | 
| 385 | 385 | } | 
| 386 | 386 | } | 
| @@ -390,7 +390,7 @@ discard block | ||
| 390 | 390 | |
| 391 | 391 | // PSR-0 fallback dirs | 
| 392 | 392 |          foreach ($this->fallbackDirsPsr0 as $dir) { | 
| 393 | -            if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { | |
| 393 | +            if (file_exists($file = $dir.DIRECTORY_SEPARATOR.$logicalPathPsr0)) { | |
| 394 | 394 | return $file; | 
| 395 | 395 | } | 
| 396 | 396 | } | 
| @@ -6,24 +6,24 @@ | ||
| 6 | 6 | |
| 7 | 7 | class ComposerStaticInitb90bf1d271f3139658812a290f5c564b | 
| 8 | 8 |  { | 
| 9 | - public static $prefixLengthsPsr4 = array ( | |
| 9 | + public static $prefixLengthsPsr4 = array( | |
| 10 | 10 | 'A' => | 
| 11 | - array ( | |
| 11 | + array( | |
| 12 | 12 | 'Anetwork\\Respond\\' => 17, | 
| 13 | 13 | ), | 
| 14 | 14 | ); | 
| 15 | 15 | |
| 16 | - public static $prefixDirsPsr4 = array ( | |
| 16 | + public static $prefixDirsPsr4 = array( | |
| 17 | 17 | 'Anetwork\\Respond\\' => | 
| 18 | - array ( | |
| 19 | - 0 => __DIR__ . '/../..' . '/src', | |
| 20 | - 1 => __DIR__ . '/../..' . '/tests', | |
| 18 | + array( | |
| 19 | + 0 => __DIR__.'/../..'.'/src', | |
| 20 | + 1 => __DIR__.'/../..'.'/tests', | |
| 21 | 21 | ), | 
| 22 | 22 | ); | 
| 23 | 23 | |
| 24 | 24 | public static function getInitializer(ClassLoader $loader) | 
| 25 | 25 |      { | 
| 26 | -        return \Closure::bind(function () use ($loader) { | |
| 26 | +        return \Closure::bind(function() use ($loader) { | |
| 27 | 27 | $loader->prefixLengthsPsr4 = ComposerStaticInitb90bf1d271f3139658812a290f5c564b::$prefixLengthsPsr4; | 
| 28 | 28 | $loader->prefixDirsPsr4 = ComposerStaticInitb90bf1d271f3139658812a290f5c564b::$prefixDirsPsr4; | 
| 29 | 29 | |
| @@ -6,5 +6,5 @@ | ||
| 6 | 6 | $baseDir = dirname($vendorDir); | 
| 7 | 7 | |
| 8 | 8 | return array( | 
| 9 | - 'Anetwork\\Respond\\' => array($baseDir . '/src', $baseDir . '/tests'), | |
| 9 | + 'Anetwork\\Respond\\' => array($baseDir.'/src', $baseDir.'/tests'), | |
| 10 | 10 | ); | 
| @@ -9,7 +9,7 @@ discard block | ||
| 9 | 9 | public static function loadClassLoader($class) | 
| 10 | 10 |      { | 
| 11 | 11 |          if ('Composer\Autoload\ClassLoader' === $class) { | 
| 12 | - require __DIR__ . '/ClassLoader.php'; | |
| 12 | + require __DIR__.'/ClassLoader.php'; | |
| 13 | 13 | } | 
| 14 | 14 | } | 
| 15 | 15 | |
| @@ -25,21 +25,21 @@ discard block | ||
| 25 | 25 | |
| 26 | 26 |          $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION'); | 
| 27 | 27 |          if ($useStaticLoader) { | 
| 28 | - require_once __DIR__ . '/autoload_static.php'; | |
| 28 | + require_once __DIR__.'/autoload_static.php'; | |
| 29 | 29 | |
| 30 | 30 | call_user_func(\Composer\Autoload\ComposerStaticInitb90bf1d271f3139658812a290f5c564b::getInitializer($loader)); | 
| 31 | 31 |          } else { | 
| 32 | - $map = require __DIR__ . '/autoload_namespaces.php'; | |
| 32 | + $map = require __DIR__.'/autoload_namespaces.php'; | |
| 33 | 33 |              foreach ($map as $namespace => $path) { | 
| 34 | 34 | $loader->set($namespace, $path); | 
| 35 | 35 | } | 
| 36 | 36 | |
| 37 | - $map = require __DIR__ . '/autoload_psr4.php'; | |
| 37 | + $map = require __DIR__.'/autoload_psr4.php'; | |
| 38 | 38 |              foreach ($map as $namespace => $path) { | 
| 39 | 39 | $loader->setPsr4($namespace, $path); | 
| 40 | 40 | } | 
| 41 | 41 | |
| 42 | - $classMap = require __DIR__ . '/autoload_classmap.php'; | |
| 42 | + $classMap = require __DIR__.'/autoload_classmap.php'; | |
| 43 | 43 |              if ($classMap) { | 
| 44 | 44 | $loader->addClassMap($classMap); | 
| 45 | 45 | } | 
| @@ -2,6 +2,6 @@ | ||
| 2 | 2 | |
| 3 | 3 | // autoload.php @generated by Composer | 
| 4 | 4 | |
| 5 | -require_once __DIR__ . '/composer' . '/autoload_real.php'; | |
| 5 | +require_once __DIR__.'/composer'.'/autoload_real.php'; | |
| 6 | 6 | |
| 7 | 7 | return ComposerAutoloaderInitb90bf1d271f3139658812a290f5c564b::getLoader(); |