@@ -76,7 +76,7 @@ |
||
76 | 76 | || !isset($this->definition[RecordEntity::INVERSE][1]) |
77 | 77 | ) { |
78 | 78 | throw new RelationSchemaException( |
79 | - "Unable to revert BELONG_TO relation '{$this->record}'.'{$this}', " . |
|
79 | + "Unable to revert BELONG_TO relation '{$this->record}'.'{$this}', ". |
|
80 | 80 | "backward relation type is missing or invalid." |
81 | 81 | ); |
82 | 82 | } |
@@ -81,7 +81,7 @@ |
||
81 | 81 | || !isset($this->definition[RecordEntity::INVERSE][1]) |
82 | 82 | ) { |
83 | 83 | throw new RelationSchemaException( |
84 | - "Unable to revert BELONG_TO_MORPHED relation '{$this->record}'.'{$this}', " . |
|
84 | + "Unable to revert BELONG_TO_MORPHED relation '{$this->record}'.'{$this}', ". |
|
85 | 85 | "backward relation type is missing or invalid." |
86 | 86 | ); |
87 | 87 | } |
@@ -137,8 +137,8 @@ discard block |
||
137 | 137 | * |
138 | 138 | * @see Record::$indexes |
139 | 139 | */ |
140 | - const INDEX = 1000; //Default index type |
|
141 | - const UNIQUE = 2000; //Unique index definition |
|
140 | + const INDEX = 1000; //Default index type |
|
141 | + const UNIQUE = 2000; //Unique index definition |
|
142 | 142 | |
143 | 143 | /** |
144 | 144 | * Errors in relations and acessors. |
@@ -459,7 +459,7 @@ discard block |
||
459 | 459 | public function setField($name, $value, $filter = true) |
460 | 460 | { |
461 | 461 | if (!array_key_exists($name, $this->fields)) { |
462 | - throw new FieldException("Undefined field '{$name}' in '" . static::class . "'."); |
|
462 | + throw new FieldException("Undefined field '{$name}' in '".static::class."'."); |
|
463 | 463 | } |
464 | 464 | |
465 | 465 | $original = isset($this->fields[$name]) ? $this->fields[$name] : null; |
@@ -485,7 +485,7 @@ discard block |
||
485 | 485 | public function getField($name, $default = null, $filter = true) |
486 | 486 | { |
487 | 487 | if (!array_key_exists($name, $this->fields)) { |
488 | - throw new FieldException("Undefined field '{$name}' in '" . static::class . "'."); |
|
488 | + throw new FieldException("Undefined field '{$name}' in '".static::class."'."); |
|
489 | 489 | } |
490 | 490 | |
491 | 491 | $value = $this->fields[$name]; |
@@ -529,7 +529,7 @@ discard block |
||
529 | 529 | //Constructing relation |
530 | 530 | if (!isset($this->ormSchema[ORM::M_RELATIONS][$name])) { |
531 | 531 | throw new RecordException( |
532 | - "Undefined relation {$name} in record " . static::class . "." |
|
532 | + "Undefined relation {$name} in record ".static::class."." |
|
533 | 533 | ); |
534 | 534 | } |
535 | 535 | |
@@ -683,7 +683,7 @@ discard block |
||
683 | 683 | public function __debugInfo() |
684 | 684 | { |
685 | 685 | $info = [ |
686 | - 'table' => $this->ormSchema[ORM::M_DB] . '/' . $this->ormSchema[ORM::M_TABLE], |
|
686 | + 'table' => $this->ormSchema[ORM::M_DB].'/'.$this->ormSchema[ORM::M_TABLE], |
|
687 | 687 | 'pivotData' => $this->pivotData, |
688 | 688 | 'fields' => $this->getFields(), |
689 | 689 | 'errors' => $this->getErrors() |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | throw new CacheException("Entity cache size exceeded."); |
98 | 98 | } |
99 | 99 | |
100 | - return $this->cache[get_class($entity) . '.' . $entity->primaryKey()] = $entity; |
|
100 | + return $this->cache[get_class($entity).'.'.$entity->primaryKey()] = $entity; |
|
101 | 101 | } |
102 | 102 | |
103 | 103 | /** |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | return; |
112 | 112 | } |
113 | 113 | |
114 | - unset($this->cache[get_class($entity) . '.' . $entity->primaryKey()]); |
|
114 | + unset($this->cache[get_class($entity).'.'.$entity->primaryKey()]); |
|
115 | 115 | } |
116 | 116 | |
117 | 117 | /** |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | */ |
124 | 124 | public function has($class, $primaryKey) |
125 | 125 | { |
126 | - return isset($this->cache[$class . '.' . $primaryKey]); |
|
126 | + return isset($this->cache[$class.'.'.$primaryKey]); |
|
127 | 127 | } |
128 | 128 | |
129 | 129 | /** |
@@ -135,11 +135,11 @@ discard block |
||
135 | 135 | */ |
136 | 136 | public function get($class, $primaryKey) |
137 | 137 | { |
138 | - if (empty($this->cache[$class . '.' . $primaryKey])) { |
|
138 | + if (empty($this->cache[$class.'.'.$primaryKey])) { |
|
139 | 139 | return null; |
140 | 140 | } |
141 | 141 | |
142 | - return $this->cache[$class . '.' . $primaryKey]; |
|
142 | + return $this->cache[$class.'.'.$primaryKey]; |
|
143 | 143 | } |
144 | 144 | |
145 | 145 | /** |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | */ |
91 | 91 | public function has($name) |
92 | 92 | { |
93 | - return $this->driver->get($this->prefix . $name); |
|
93 | + return $this->driver->get($this->prefix.$name); |
|
94 | 94 | } |
95 | 95 | |
96 | 96 | /** |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | */ |
99 | 99 | public function get($name) |
100 | 100 | { |
101 | - return $this->driver->get($this->prefix . $name); |
|
101 | + return $this->driver->get($this->prefix.$name); |
|
102 | 102 | } |
103 | 103 | |
104 | 104 | /** |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | $lifetime = 0; |
114 | 114 | } |
115 | 115 | |
116 | - return $this->driver->set($this->prefix . $name, $data, $lifetime); |
|
116 | + return $this->driver->set($this->prefix.$name, $data, $lifetime); |
|
117 | 117 | } |
118 | 118 | |
119 | 119 | /** |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | */ |
122 | 122 | public function forever($name, $data) |
123 | 123 | { |
124 | - return $this->driver->forever($this->prefix . $name, $data); |
|
124 | + return $this->driver->forever($this->prefix.$name, $data); |
|
125 | 125 | } |
126 | 126 | |
127 | 127 | /** |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | */ |
130 | 130 | public function delete($name) |
131 | 131 | { |
132 | - return $this->driver->delete($this->prefix . $name); |
|
132 | + return $this->driver->delete($this->prefix.$name); |
|
133 | 133 | } |
134 | 134 | |
135 | 135 | /** |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | */ |
138 | 138 | public function inc($name, $delta = 1) |
139 | 139 | { |
140 | - return $this->driver->inc($this->prefix . $name); |
|
140 | + return $this->driver->inc($this->prefix.$name); |
|
141 | 141 | } |
142 | 142 | |
143 | 143 | /** |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | */ |
146 | 146 | public function dec($name, $delta = 1) |
147 | 147 | { |
148 | - return $this->driver->dec($this->prefix . $name, $delta); |
|
148 | + return $this->driver->dec($this->prefix.$name, $delta); |
|
149 | 149 | } |
150 | 150 | |
151 | 151 | /** |
@@ -165,6 +165,6 @@ |
||
165 | 165 | */ |
166 | 166 | protected function makeFilename($name) |
167 | 167 | { |
168 | - return $this->directory . '/' . md5($name) . '.' . $this->extension; |
|
168 | + return $this->directory.'/'.md5($name).'.'.$this->extension; |
|
169 | 169 | } |
170 | 170 | } |
171 | 171 | \ No newline at end of file |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | */ |
41 | 41 | public function has($name) |
42 | 42 | { |
43 | - return xcache_isset($this->prefix . $name); |
|
43 | + return xcache_isset($this->prefix.$name); |
|
44 | 44 | } |
45 | 45 | |
46 | 46 | /** |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | */ |
49 | 49 | public function get($name) |
50 | 50 | { |
51 | - return xcache_get($this->prefix . $name); |
|
51 | + return xcache_get($this->prefix.$name); |
|
52 | 52 | } |
53 | 53 | |
54 | 54 | /** |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | */ |
57 | 57 | public function set($name, $data, $lifetime) |
58 | 58 | { |
59 | - return xcache_set($this->prefix . $name, $data, $lifetime); |
|
59 | + return xcache_set($this->prefix.$name, $data, $lifetime); |
|
60 | 60 | } |
61 | 61 | |
62 | 62 | /** |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | */ |
65 | 65 | public function forever($name, $data) |
66 | 66 | { |
67 | - return xcache_set($this->prefix . $name, $data, 0); |
|
67 | + return xcache_set($this->prefix.$name, $data, 0); |
|
68 | 68 | } |
69 | 69 | |
70 | 70 | /** |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | */ |
73 | 73 | public function delete($name) |
74 | 74 | { |
75 | - xcache_unset($this->prefix . $name); |
|
75 | + xcache_unset($this->prefix.$name); |
|
76 | 76 | } |
77 | 77 | |
78 | 78 | /** |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | */ |
81 | 81 | public function inc($name, $delta = 1) |
82 | 82 | { |
83 | - return xcache_inc($this->prefix . $name, $delta); |
|
83 | + return xcache_inc($this->prefix.$name, $delta); |
|
84 | 84 | } |
85 | 85 | |
86 | 86 | /** |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | */ |
89 | 89 | public function dec($name, $delta = 1) |
90 | 90 | { |
91 | - return xcache_dec($this->prefix . $name, $delta); |
|
91 | + return xcache_dec($this->prefix.$name, $delta); |
|
92 | 92 | } |
93 | 93 | |
94 | 94 | /** |
@@ -68,10 +68,10 @@ discard block |
||
68 | 68 | public function has($name) |
69 | 69 | { |
70 | 70 | if ($this->driver == self::APCU_DRIVER) { |
71 | - return apcu_exists($this->prefix . $name); |
|
71 | + return apcu_exists($this->prefix.$name); |
|
72 | 72 | } |
73 | 73 | |
74 | - return apc_exists($this->prefix . $name); |
|
74 | + return apc_exists($this->prefix.$name); |
|
75 | 75 | } |
76 | 76 | |
77 | 77 | /** |
@@ -80,10 +80,10 @@ discard block |
||
80 | 80 | public function get($name) |
81 | 81 | { |
82 | 82 | if ($this->driver == self::APCU_DRIVER) { |
83 | - return apcu_fetch($this->prefix . $name); |
|
83 | + return apcu_fetch($this->prefix.$name); |
|
84 | 84 | } |
85 | 85 | |
86 | - return apc_fetch($this->prefix . $name); |
|
86 | + return apc_fetch($this->prefix.$name); |
|
87 | 87 | } |
88 | 88 | |
89 | 89 | /** |
@@ -92,10 +92,10 @@ discard block |
||
92 | 92 | public function set($name, $data, $lifetime) |
93 | 93 | { |
94 | 94 | if ($this->driver == self::APCU_DRIVER) { |
95 | - return apcu_store($this->prefix . $name, $data, $lifetime); |
|
95 | + return apcu_store($this->prefix.$name, $data, $lifetime); |
|
96 | 96 | } |
97 | 97 | |
98 | - return apc_store($this->prefix . $name, $data, $lifetime); |
|
98 | + return apc_store($this->prefix.$name, $data, $lifetime); |
|
99 | 99 | } |
100 | 100 | |
101 | 101 | /** |
@@ -112,12 +112,12 @@ discard block |
||
112 | 112 | public function delete($name) |
113 | 113 | { |
114 | 114 | if ($this->driver == self::APCU_DRIVER) { |
115 | - apcu_delete($this->prefix . $name); |
|
115 | + apcu_delete($this->prefix.$name); |
|
116 | 116 | |
117 | 117 | return; |
118 | 118 | } |
119 | 119 | |
120 | - apc_delete($this->prefix . $name); |
|
120 | + apc_delete($this->prefix.$name); |
|
121 | 121 | } |
122 | 122 | |
123 | 123 | /** |
@@ -126,10 +126,10 @@ discard block |
||
126 | 126 | public function inc($name, $delta = 1) |
127 | 127 | { |
128 | 128 | if ($this->driver == self::APCU_DRIVER) { |
129 | - return apcu_inc($this->prefix . $name, $delta); |
|
129 | + return apcu_inc($this->prefix.$name, $delta); |
|
130 | 130 | } |
131 | 131 | |
132 | - return apc_inc($this->prefix . $name, $delta); |
|
132 | + return apc_inc($this->prefix.$name, $delta); |
|
133 | 133 | } |
134 | 134 | |
135 | 135 | /** |
@@ -138,10 +138,10 @@ discard block |
||
138 | 138 | public function dec($name, $delta = 1) |
139 | 139 | { |
140 | 140 | if ($this->driver == self::APCU_DRIVER) { |
141 | - return apcu_dec($this->prefix . $name, $delta); |
|
141 | + return apcu_dec($this->prefix.$name, $delta); |
|
142 | 142 | } |
143 | 143 | |
144 | - return apc_dec($this->prefix . $name, $delta); |
|
144 | + return apc_dec($this->prefix.$name, $delta); |
|
145 | 145 | } |
146 | 146 | |
147 | 147 | /** |
@@ -50,7 +50,7 @@ |
||
50 | 50 | && stripos($url, 'http://') === false && stripos($url, 'https://') === false |
51 | 51 | ) { |
52 | 52 | //Forcing scheme (not super great idea) |
53 | - $url = 'http://' . $url; |
|
53 | + $url = 'http://'.$url; |
|
54 | 54 | } |
55 | 55 | |
56 | 56 | return (bool)filter_var($url, FILTER_VALIDATE_URL); |